﻿using System;

using Rarous.TexyNet.Configuration;
using Rarous.TexyNet.Modules;

using Xunit;

namespace Rarous.TexyNet.Test {

  /// <summary>
  /// This is a test class for FormatterModuleTest and is intended
  /// to contain all FormatterModuleTest Unit Tests
  /// </summary>
  public class FormatterModuleTest {

    /// <summary>
    /// A test for LineWrapTest
    /// </summary>
    [Fact]
    public void FormatterModule_LineWrap_PropertyBehavior() {
      FormatterModule target = new FormatterModule();
      int expected = 0;
      target.LineWrap = expected;

      Assert.Equal(expected, target.LineWrap);
    }

    /// <summary>
    /// A test for IndentTest
    /// </summary>
    [Fact]
    public void FormatterModule_Indent_PropertyBehavior() {
      FormatterModule target = new FormatterModule();
      bool expected = true;
      target.Indent = expected;

      Assert.Equal(expected, target.Indent);
    }

    /// <summary>
    /// A test for FormatterModuleConstructorTest1
    /// </summary>
    [Fact]
    public void FormatterModule_Constructor_Default() {
      FormatterModule target = new FormatterModule();

      Assert.Equal(72, target.LineWrap);
    }

    /// <summary>
    /// A test for FormatterModuleConstructorTest
    /// </summary>
    [Fact]
    public void FormatterModule_Constructor_NullConfigElement() {
      FormatterModule target = new FormatterModule(null);

      Assert.Equal(72, target.LineWrap);
    }
  }
}
